package com.example.pre.service.impl;

import java.util.Collection;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.pre.dao.FlowTemplatesUserDao;
import com.example.pre.model.FlowTemplatesUser;
import com.example.pre.service.FlowTemplatesUserServcie;

/*
 * 流程模板-用户service层实现类
 */
@Service
public class FlowTemplatesUserServiceImpl implements FlowTemplatesUserServcie {

	@Autowired
	private FlowTemplatesUserDao flowTemplatesUserDao;

	@Override
	public FlowTemplatesUser get(int id) {
		return flowTemplatesUserDao.get(id);
	}

	@Override
	public Collection<FlowTemplatesUser> getAll() {
		return flowTemplatesUserDao.listByCondition(null);
	}

	@Override
	public boolean update(FlowTemplatesUser m) {
		return flowTemplatesUserDao.update(m) == 1;
	}

	@Override
	public boolean delete(int id) {
		return flowTemplatesUserDao.delete(id) == 1;
	}

	@Override
	public boolean create(FlowTemplatesUser m) {
		return flowTemplatesUserDao.create(m) == 1;
	}

	@Override
	public Collection<FlowTemplatesUser> listByCondition(Map<String, Object> whereColumn) {
		return flowTemplatesUserDao.listByCondition(whereColumn);
	}

	@Override
	public int countByCondition(Map<String, Object> whereColumn) {
		return flowTemplatesUserDao.countByCondition(whereColumn);
	}

}
